package com.wangzhixuan.model.vo;

import java.io.Serializable;

import com.wangzhixuan.commons.constant.ApiCode;
import com.wangzhixuan.commons.scan.MyException;
import com.wangzhixuan.commons.utils.StringUtils;

/**
 * <p>
 * 
 * </p>
 *
 * @author zhixuan.wang
 * @since 2017-07-11
 */
public class CategoryVo implements Serializable {

    private static final long serialVersionUID = 1L;
    
    private Integer jobId;
	private Integer userId;
	private String jobName;
	private String jobDescrib;
	private String jobCategory;
	public Integer getJobId() {
		return jobId;
	}
	public void setJobId(Integer jobId) {
		this.jobId = jobId;
	}
	public Integer getUserId() {
		return userId;
	}
	public void setUserId(Integer userId) {
		this.userId = userId;
	}
	public String getJobName() {
		return jobName;
	}
	public void setJobName(String jobName) {
		this.jobName = jobName;
	}
	public String getJobDescrib() {
		return jobDescrib;
	}
	public void setJobDescrib(String jobDescrib) {
		this.jobDescrib = jobDescrib;
	}
	public String getJobCategory() {
		return jobCategory;
	}
	public void setJobCategory(String jobCategory) {
		this.jobCategory = jobCategory;
	}
	
	public void checekParam() throws MyException{
		if(this.userId==null){
			 throw new MyException(ApiCode.CODE_501, "请重新登录");
		}
		if (StringUtils.isBlank(jobName)) {
			throw new MyException(ApiCode.CODE_501, "网络异常，请稍后重试");
        }
		if (StringUtils.isBlank(jobCategory)) {
			throw new MyException(ApiCode.CODE_501, "网络异常，请稍后重试");
        }
	}
	
}
